package tool;

import android.content.Context;
import android.net.*;

public class tools {
	public static boolean isNetworkConnected(Context context)
	{
		ConnectivityManager man=(ConnectivityManager) context.getApplicationContext()
				.getSystemService(Context.CONNECTIVITY_SERVICE);
		if (man == null) {  
			return false;
		}
		NetworkInfo Info = man.getActiveNetworkInfo(); 
		if (Info == null || !Info.isAvailable()) {  
	           return false;  
		}
		return true;
	}
}
